class Symmetry {
    public void isSymmmertry(String str) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(str); // 将str放入StringBuilder中进行修改
        // 调用revese方法将字符串反转，再用toString方法并返回字符串
        String str2 = stringBuilder.reverse().toString();
        if(str.equals(str2)){
            System.out.println("该字符串是对称的");
        }else{
            System.out.println("该字符串是不对称的");
        }
    }
}
